package com.company.作业;

public class SumUtils {
    public void getsum(int a,int b){
        System.out.println("相加的和是:"+(a+b));
    }
    public void getsum(double c,double d){
        System.out.println("小数相加的和是："+(c+d));
    }
    public void getsum(String e,String f){
        System.out.println("字符串相加的和是："+(e+f));
    }
    public void getsum(int g){
        int sum=0;
        for (int i = 1; i <=g ; i++) {
            sum+=i;
        }
        System.out.println("1到"+g+"的整数和是："+sum);
    }

}
